1. Field of the Invention
The invention relates to a redundant array of independent disks (RAID) consistency initialization method.
2. Description of the Prior Art
In a computer system, a redundant array of independent disks subsystem (RAID subsystem) is used to provide data storage space having high availability, high performance, or high volume to the host entity.
A prior art RAID subsystem comprises a RAID controller, and a RAID composed of a plurality of hard disc drives (HDD) electrically connected to the RAID controller. Furthermore, the RAID controller defines the RAID as one or more logical disk drives of RAID—level 1, 3, or 5.
A RAID subsystem has to perform the process of RAID creation to define the RAID itself, and then is presented to the host entity. At this time, the RAID is available to the host entity or on line so that the host entity is capable of accessing the RAID. When the RAID is not available to the host entity or not on line, the host entity does not know the existence of the RAID and can not access the RAID.
The above-mentioned RAID creation is shown in FIG. 1A. When RAID creation is started (100), RAID configuration is firstly set (110), and then a consistency initialization is performed (150). After the consistency initialization is completed, the RAID configuration is written to the member disks (130). Meanwhile, the RAID creation is regarded as being completed (140), and the RAID is then presented to the host entity (180) so that the RAID is available to the host entity. The operation of the consistency initialization is to make user data and check data consistent. The consistency initialization needs to be performed because only when the member disks had been performed with consistency initialization, the data stored therein can be regenerated while the member disk is out of order. Please refer to FIG. 1B, which is a flow chart of a consistency initialization process according to the prior art. The consistency initialization is executed by performing initialization block-by-block from block 0 to the last block. That is, the consistency initialization is executed by performing initialization on block 0 firstly, and then on block 1 after block 0 is completely executed, and the consistency initialization is executed on the blocks one after another until the last block is completely executed.
In the prior art method of RAID creation and the consistency initialization, several problems are illustrated as follows. First, the consistency initialization spends a lot of time, such as a few hours, or even a few days. However, as mentioned above, before the consistency initialization is completed and the RAID is presented to the host entity, the RAID is not available to the host entity or not on line so that the RAID can not be accessed. In other words, it takes the users at least several hours to wait until the RAID subsystem can be used since the execution of the RAID creation. This makes users/customers very inconvenient.
Therefore, how to complete the RAID creation fast and present the RAID subsystem to the host entity or allow the RAID to be accessed by I/O as soon as possible becomes a serious problem to be solved.